from abc import ABC, abstractmethod

from sqlalchemy.orm import Session

from model.dto.sys.login_token_dto import LoginTokenDto
from model.request.sys.login_request import LoginRequest


class UserService(ABC):
    @abstractmethod
    def login(self, db: Session, login_request: LoginRequest) -> LoginTokenDto:
        """
        登录
        :param db:
        :param login_request:
        :return:
        """
        pass

    @abstractmethod
    def refresh_token(self, db: Session, refresh_token: str) -> LoginTokenDto:
        """
        刷新token
        :param db:
        :param refresh_token: 刷新 token
        :return:
        """
        pass
